#include "Material.h"

Material::Material(tstring materialName):
m_MaterialName(materialName),
m_DiffTextureSet(false),
m_SpecularTextureSet(false),
m_NormalMapTextureSet(false),
m_DiffuseDXTex(NULL),
m_NormalMapDXTex(NULL),
m_SpecularDXTex(NULL),
m_Diffuse(D3DXVECTOR3(.2f,.9f,.2f)),
m_Specular(D3DXVECTOR3(1.0f,1.0f,1.0f)),
m_Ambient(D3DXVECTOR3(.1f,.5f,.1f))
{
}

Material::~Material(void)
{
}

void Material::SetDiffuseTexture(tstring diffTexture){
	m_DiffTexture = diffTexture;
	m_DiffTextureSet = true;
}

void Material::SetSpecularTexture(tstring specularTexture)
{
	m_SpecularTexture = specularTexture;
	m_SpecularTextureSet = true;
}

void Material::SetNormalMapTexture(tstring normalMapTexture)
{
	m_NormalMapTexture = normalMapTexture;
	m_NormalMapTextureSet = true;
}

/*
void Material::Compile(Device3D *device){
	if (this->IsDiffuseTextureSet()){
		m_DiffuseDXTex = device->Compile(m_DiffTexture);
	}
	if ( this->IsNormalMapTextureSet()){
		m_NormalMapDXTex = device->Compile(m_NormalMapTexture);
	}
	if ( this->IsSpecularTextureSet()){
		m_SpecularDXTex = device->Compile(m_SpecularTexture);
	}
}
*/